package com.jdk8.parameter_04;

import java.util.ArrayList;
import java.util.List;

public class FormatterModel {

    public <T> List<String> prettyPrint(List<T> list, Formatter<T> formatter){
        ArrayList<String> strings = new ArrayList<>();
        for(T t: list){
            String str = formatter.accept(t);
            strings.add(str);
        }
        return strings;
    }
}
